<style>
    @media (max-width: 1000px) {
        .menu-list-img {min-height: 0px;overflow: hidden;}
    }
</style>
<div style="min-height:600px;">
    <div class='weui-flex'>
        <div class="container">
            <div class='weui-flex__item'>
                <div id="collect-list" class='bc-list' data-port='http://api.hongyanche.com/collect/collect_list'>
                    <div style="padding: 10px;background: #eee;border-radius: 26px;">
                        <label>
                            <input autocomplete='off' name='class' value='2' checked type='radio'/>
                            帖子收藏
                        </label>
                        <label>
                            <input autocomplete='off' name='class' value='1' type='radio'/>
                            商品收藏
                        </label>
                    </div>
                    <div class='bc-list-template weui-cells'>
                        <div class='weui-flex'>
                            <div class='weui-flex__item'>
                                <div class='weui-cells'
                                     style='padding:5px;display: block;color:#666;font-size: 14px;'>
                                    <div class='weui-flex-center weui-flex-xs weui-flex-xs-center weui-flex'>
                                        <mall_id list=d>
                                            <div class="menu-list-img"
                                                 style="display: inline-block; height: 50px; width: 50px">
                                                <imgurl list=d>
                                                    <imgurl list=i><img style="width: 50px;height: 100%"/></imgurl>
                                                </imgurl>
                                            </div>
                                        </mall_id>
                                        &nbsp;
                                        <!--<div class='weui-flex__item'>-->
                                        <!--数量：<amount range=1></amount>-->
                                        <!--</div>-->
                                        <div class="weui-flex__item">
                                            <a class="collect" style="color: #2d6987; font-size: 14px; padding: 5px 0;"
                                               href=""><title list=1></title></a>
                                            <url list=1 class="hidden"></url>
                                        </div>

                                        <!--<forum_id list=d class="weui-flex__item">-->
                                        <!--<div>-->
                                        <!--作者：-->
                                        <!--<user_name list=1></user_name>-->
                                        <!--</div>-->
                                        <!--</forum_id>-->
                                        <!--<forum_id list=d class="weui-flex__item">-->
                                        <!--<div>-->
                                        <!--发布时间：-->
                                        <!--<create_time list=1></create_time>-->
                                        <!--</div>-->
                                        <!--</forum_id>-->
                                        <mall_id list=d class="weui-flex__item">
                                            <div>
                                                ￥：
                                                <price_min list=f></price_min>
                                            </div>
                                        </mall_id>
                                        <div class=''>
                                            <a href="javascript:void(0)" class="weui-btn weui-btn_mini weui-btn_warn" id="dele">删除</a>
                                            <collect_id list=1 class="hidden"></collect_id>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    (function (w, u) {
        $('#collect-list').on('bc-list-success', function () {
            $('.collect').each(function (index, el) {
                $(el).attr('href', $(this).next().text())
            });
        });
        $('body').on('click','#dele',function () {
            var id = $(this).next().text();
            var del = confirm('是否删除')
            if(del) {
                $.ajax({
                    url: '/collect/remove',
                    type: 'POST',
                    data: {
                        collect_id: id
                    },
                    success: function (e) {
                        if (e.state) {
                            TOAST.success('删除成功', ' ', 1);
                            LIST.reload('#collect-list');
                        } else {
                            return TOAST.wran(e.errormsg, ' ', 1)
                        }
                    }
                })
            }
        })
    })(window, undefined)

</script>